import 'package:wanxiang_app/generated/json/base/json_field.dart';
import 'package:wanxiang_app/generated/json/invite_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class InviteEntity {
	late int code;
	late String msg;
	late List<InviteData> data;

	InviteEntity();

	factory InviteEntity.fromJson(Map<String, dynamic> json) => $InviteEntityFromJson(json);

	Map<String, dynamic> toJson() => $InviteEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class InviteData {
	late int id;
	@JSONField(name: "user_name")
	late String userName;
	@JSONField(name: "nick_name")
	late String nickName;
	@JSONField(name: "user_photo")
	late String userPhoto;
	@JSONField(name: "reg_time")
	late String regTime;

	InviteData();

	factory InviteData.fromJson(Map<String, dynamic> json) => $InviteDataFromJson(json);

	Map<String, dynamic> toJson() => $InviteDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}